@extends('layouts.supervisor')

@section('content')

<style type="text/css">
.delegate{margin:10px;}
</style>
<div class="page-content">
	<div class="page-header">
		<h1>论文评分和评语</h1>
	</div>
	<div class="row">
		<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->
			<form id="setting-form" name="twowayform" class="form-horizontal" method="POST" action="/supervisor/thesis/storeview">
				{{ csrf_field() }}
				<input type="hidden" name="student_id" value="{{$student->id}}" /> 
				<div class="space-4"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label no-padding-right" for="form-input-readonly"> 学生姓名 </label>
					<div class="col-sm-9">
						{{$student->user->name}}
					</div>
				</div>

				<div class="space-4"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 论文名称 </label>
					<div class="col-sm-9">
						{{$student->thesis->title}}
					</div>
				</div>

				<div class="space-4"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 评语(评审表) </label>
					<textarea rows="3" cols="80" name="comment">{{$student->thesis->comment}}</textarea> 
				</div>

				<div class="space-4"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label no-padding-right" for="form-field-3"> 分数（评审表） </label>
					<input type="text"  name="grade" value="@if ($student->thesis->grade != 0){{$student->thesis->grade}}@endif" /> 
				</div>

				<div class="space-4"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label no-padding-right" for="form-field-4"> 修改意见（反馈给学生） </label>
					<div class="col-sm-9">
						<textarea rows="3" cols="80" name="advice">{{$student->thesis->advice}}</textarea> 
					</div>
				</div>


				@if (count($errors) > 0)
			    <div class="alert alert-danger">
			        <ul>
			            @foreach ($errors->all() as $error)
			                <li>{{ $error }}</li>
			            @endforeach
			        </ul>
			    </div>
				@endif

				<div class="clearfix form-actions">
					<div class="col-md-offset-3 col-md-9">
						<button class="btn btn-info" type="button" onclick="event.preventDefault(); document.getElementById('setting-form').submit();">
							<i class="icon-ok bigger-110"></i>
							Submit
						</button>
						<a href="/supervisor/thesis/down_grade/{{$student->id}}"> 下载成绩单</a>
					</div>
				</div>
			</form>
		</div>
	</div>

</div>

<script type="text/javascript">
</script>

@endsection
